using System;
using System.Collections.Generic;

namespace CMS.Core.Domain
{
    /// <summary>
    /// BaiViet object for NHibernate mapped table BaiViet.
    /// </summary>
    [Serializable]
    public class BaiViet : DomainObject<System.Int32>
    {
        private System.String _TieuDe;
        private System.String _TomTat;
        private System.String _NoiDung;
        private System.String _AnhDaiDien;
        private System.String _ChuThichAnh;
        private System.DateTime _NgayCapNhat;        
        private System.String _NguonTin;
        private System.Boolean _TrangThai;
        private BaiVietTheLoai _MaTheLoaiLookup;
        private NguoiSuDung _NguoiCapNhatLookup;

        public BaiViet()
        {
        }

        public BaiViet(System.Int32 id)
        {
            base.ID = id;
        }

        public virtual System.String TieuDe
        {
            get { return _TieuDe; }
            set { _TieuDe = value; }
        }

        public virtual System.String TomTat
        {
            get { return _TomTat; }
            set { _TomTat = value; }
        }

        public virtual System.String NoiDung
        {
            get { return _NoiDung; }
            set { _NoiDung = value; }
        }

        public virtual System.String AnhDaiDien
        {
            get { return _AnhDaiDien; }
            set { _AnhDaiDien = value; }
        }
        public virtual System.String ChuThichAnh
        {
            get { return _ChuThichAnh; }
            set { _ChuThichAnh = value; }
        }

        public virtual System.DateTime NgayCapNhat
        {
            get { return _NgayCapNhat; }
            set { _NgayCapNhat = value; }
        }
      
        public virtual System.String NguonTin
        {
            get { return _NguonTin; }
            set { _NguonTin = value; }
        }

        public virtual System.Boolean TrangThai
        {
            get { return _TrangThai; }
            set { _TrangThai = value; }
        }

        public virtual BaiVietTheLoai MaTheLoaiLookup
        {
            get { return _MaTheLoaiLookup; }
            set { _MaTheLoaiLookup = value; }
        }

        public virtual NguoiSuDung NguoiCapNhatLookup
        {
            get { return _NguoiCapNhatLookup; }
            set { _NguoiCapNhatLookup = value; }
        }

        public virtual string TenTheLoai
        {
            get { return this.MaTheLoaiLookup.TenTheLoai; }
        }


        public override int GetHashCode()
        {
            return ID.GetHashCode();
        }

    }
}
